
//
// Copyright 2009 Arne Halvorsen (arne.halvorsen@gmail.com)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

// Project page: http://code.google.com/p/mf4j/

//
// 091116 - aha42 - Starts in line change tracking.
// 091121 - aha42 - Added project page link (google code) to header comment.
// 091210 - aha42 - IOException -> FlickrException.
//

package org.aha.mf4j.reflection;

import org.aha.mf4j.FlickrException;
import org.aha.mf4j.FlickrSession;

/**
 * <p>
 *   Interface that provides meta data about the Flickr API.
 * </p>
 * <p>
 *   Clients can get access to this interface invoking
 *   {@link FlickrSession#getReflection()}.
 * </p>
 * @author Arne Halvorsen (aha42)
 */
public interface Reflection 
{
  /**
   * <p>
   *   Tells if method exists.
   * </p>
   * @param name Method name.
   * @return {@code true} if exists, {@code false} if does not.
   */
  boolean methodExists(String name);
  
  /**
   * <p>
   *   Gets meta data for named method.
   * </p>
   * @param name Method name.
   * @return {@link FlickrMethod}.
   * @throws IllegalArgumentException If {@code name} not a Flickr method.
   * @throws FlickrException If fails.
   */
  FlickrMethod getMethod(String name) throws FlickrException;
  
}
